/**
 * This file is Copyright © 2008 Software Craftsmen Limited. All Rights Reserved.
 */
package com.softwarecraftsmen.generators.summarisers;

import org.jetbrains.annotations.NotNull;

public class Count extends Summariser<Long, Long>
{
	private static final Long Zero = 0l;
	private static final Long One = 1l;
	private Long count;

	public Count()
	{
		count = Zero;
	}

	@NotNull
	public Long summary()
	{
		return count;
	}

	public void closure(final @NotNull Long value)
	{
		count += One;
	}
}